home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Network Support Library
/
RoseWare - Network Support Library.iso
/
apidev
/
dax1.exe
/
DAP
/
DAP018.C
< prev
next >
Wrap
Text File
|
1992-07-15
|
4KB
|
95 lines
// ╔════════════════════════════════════════════════════════════════════╗
// ║ ║
// ║ module: dap018.c ║
// ║ abstract: This module contains DAP request 1018 ║
// ║ ║
// ║ environment: NetWare 3.x v3.11 ║
// ║ Network C for NLMs SDK ║
// ║ CLib v3.11 ║
// ║ Network C for DOS v2.0 ║
// ║ NetWare C Interface DOS v1.2 ║
// ║ ║
// ║ This software is provided as is and carries no warranty ║
// ║ whatsoever. Novell disclaims and excludes any and all implied ║
// ║ warranties of merchantability, title and fitness for a particular ║
// ║ purpose. Novell does not warrant that the software will satisfy ║
// ║ your requirements or that the software is without defect or error ║
// ║ or that operation of the software will be uninterrupted. You are ║
// ║ using the software at your risk. The software is not a product ║
// ║ of Novell, Inc. or any of subsidiaries. ║
// ║ ║
// ╟────────────────────────────────────────────────────────────────────╢
// ║ maintenance history: ║
// ║ level date pi description ║
// ╟────────────────────────────────────────────────────────────────────╢
// ║ 001 02/21/92 kl initial release. ║
// ╚════════════════════════════════════════════════════════════════════╝
#include "dap/dapsys.h"
//
// The following are the request/reply structures for the Recall Value
// DAP.
//
typedef struct{ // recall value request pkt
SINT32 nothing; // unused
}RVRequest;
typedef struct{ // recall value reply pkt
SINT32 value; // the recalled value
}RVReply;
#if !defined(ENGINE)
//
// Following is the Client-Side API for Recall value
//
// DAPid - this is obtained from DAPInitialize. It is
// normally a pointer to some sort of structure
// containing info needed to connect to the server.
// val - the recalled value
//
T_RC DAPRecallValue(DAPDATA *DAPid,long *val)
{
T_RC rc;
RVReply *reply = (RVReply *)DAPid->dapReply.data;
//
// Send the request
//
if( (rc = DAPSendRequest(DAPid,DAPRECALLVALUE)) == 0){
//
// Copy result
//
*val = reply->value;
}
return rc;
}
#else // !defined(ENGINE)
//
// Following is the Server-Side API for Recall Value
//
void DAPRecallValue(DAPDATA *DAPid)
{
RVReply *reply = (RVReply *)DAPid->dapReply.data;
DIAG4("Inside RecallValue DAP");
//
// Do the work
//
reply->value = DAPGetApplDataStructure(DAPid).mailBox001;
//
// Set the DAP return code
//
DAPid->dapReply.returnCode = 0;
//
// Now send the result to the client
//
DAPEnqueueServiceReply(DAPid);
}
#endif // !defined(ENGINE)